import Service from '../core/baseService';

export default class KeywordService extends Service {
    constructor(ctx) {
        super(ctx);
        this.model = ctx.sassmodel.Keyword;
    }

    async list() {
        // 取出热闹关键词
        const hotKeywords = await this.model.findAll({
            limit: 30,
            where: {
                is_show: 1
            },
            attributes: [
                'keyword',
                'is_hot',
            ]
        });
        let historyKeywords = [];

        return {
            hotKeywords,
            historyKeywords
        };
    }


}
